#pragma once
#include <stdio.h>

#define MAX_SIZE 100

#define NONE (1<<0)
#define LINE_FLUSH (1<<1)
#define FULL_FLUSH (1<<2)

typedef struct MyFile
{
    int fileno; //文件描述符
    int bufflen; //缓冲区长度
    char buff[MAX_SIZE]; 
    int mode; //刷新方式
}MyFile;

MyFile* MyFopen(const char *path,const char *mode);
void MyFclose(MyFile *pf);
void MyFflush(MyFile *pf);

size_t MyFwrite(const void *ptr, size_t size, size_t numb, MyFile *pf);

